insert
overwrite
table
jms_dm.dm_mng_cn_project_order_detail_dt
partition
(
dt
)
select project_name
     , code
     , name
     , customer_network_code
     , customer_network_name
     , customer_center_code
     , customer_center_name
     , customer_agent_code
     , customer_agent_name
     , order_id
     , waybill_no
     , pick_time
     , input_time
     , add6h_input_time
     , date_time
     , add6h_timely_pick_falg
     , real_pick_network_code
     , real_pick_network_name
     , dispatch_network_code
     , dispatch_network_name
     , cancel_flag
     , order_status_code
     , real_pick_provider_desc
     , real_pick_city_desc
     , dispatch_provider_desc
     , dispatch_city_desc
     , arbitration_flag
     , platform_effect_days
     , platform_effect_falg
     , sign_time
     , sign_network_code
     , sign_network_name
     , way_input_time
     , waybill_status_code
     , sign_falg
     , is_waybill_flag
     , problem_type_code
     , problem_type_name
     , problem_type_subject_code
     , problem_type_subject_name
     , express_flag
     , m6_addeff_pick_time
     , m7_addeff_pick_time
     , pick_date_time
     , agent_code
     , agent_name
     , center_code
     , center_name
     , dt
from jms_dm.dm_mng_cn_project_order_detail_before_dt
where dt <= '{{ execution_date |  cst_ds }}'
  and dt >= date_add('{{ execution_date |  cst_ds }}', -30)
distribute by dt